//公共请求的方法
import base from './base'

import axios from 'axios'
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8';


const api = {

    totalInfo() {
        return axios.get(base.totalInfo)
    },

    orderInfo() {
        return axios.get(base.orderInfo)
    },

    // 产品列表
    projectList(params) {
        return axios.get(base.projectList, { params })
    },

    //客户列表
    customerList(params) {
        return axios.post(base.customerList, params)
    },

    //新增客户
    addCustomer(params) {
        return axios.post(base.addCustomer, params)
    },

    //删除客户接口
    deleteCustomer(params) {
        return axios.delete(`${base.deleteCustomer}?ids=${params.ids.join(',')}`)
    },

    //下载客户模板
    downloadTemplate(params) {
        return axios.get(base.downloadTemplate, { params, responseType: 'blob' })
    },

    //导出客户数据接口
    exportCustomer(params) {
        return axios.get(base.exportCustomer, { params, responseType: 'blob' })
    },

    //查询公司人脸接口
    faceList(params) {
        return axios.post(base.faceList, params)
    },


    //新增客户
    login(params) {
        return axios.post(base.login, params)
    },

    //ph
    //ph学生数据回显
    phStudentList(params){
        return axios.post(base.phStudentList,params)
    },

    //调用ai接口
    doAi(params){
        return axios.post(base.doAi,params)
    },


    //知识库调用聊天接口
    doChat(params){
        return axios.post(base.doChat,params)
    },
    

}

//let pageNum = 1; // 这里替换为你需要的页码数
// axios.get('/category/paging', { params: { pageNum } })
// .then(response => {
//     console.log(response.data);
// });

export default api